Computer systems or other accessories, collectively referred to as “computer systems”, generally include data storage devices, such as hard disk drives. A hard disk drive is an electromechanical or an optical-mechanical device that reads from and writes to a hard disk that includes one or more disk platens. The main components of a disk drive are a spindle on which the platens are mounted, a drive motor for spinning the platens, one or more read/write heads, a seek mechanism for positioning the heads over the platens, and a controller which synchronizes read/write commands and transfers information to and from other components of the computer system.
In operation, the computer system provides logical instructions to its disk drive, to read or write data into storage locations on the disk. Although the instructions typically include a logical address for the data, the data is not stored in logical format; rather, the data is stored in a physical address location. The controller typically translates the logical address into a physical address. Once the translation occurs, the controller directs the heads to the physical address location at which the desired data is stored or read.
The amount of time from the start of the movement of the heads arm until the start of the read or write phase of an I/O command is referred to as the “access time”. Access time is comprised of two components. The first component is the seek and settling time, which is the time required to move a disk drive's read/write head to a specific track or cylinder on a disk and settling it on the target track. The second component is the rotational latency time, which corresponds to the additional time required for the disk to rotate so that the desired physical address location is located underneath the properly positioned head.
The available rotational time of a command is calculated based on the rotational position of the command and the current position of the head. If there is no chance that the command could be accessed at that time because of the radial distance, this rotational time is repeatedly incremented by one revolution time, until there is a positive probability of a successful access.
Each disk typically includes a plurality of concentric tracks, on one or both surfaces, from which information is read, or onto which information is written by a read/write element. In addition, each track is further divided into a plurality of sectors. A cylinder is formed by a plurality of tracks with the same radial coordinate. In a disk drive, a disk rotates at a high speed while the read/write element “flies” over the surface of the rotating disk. The read/write element is positioned over specific areas or sectors of the disk in accordance with commands received from the computer system. The numerous commands of the computer system usually exceed the drive's ability to execute the commands immediately upon receipt, in which case a queue is formed. The set of commands available for execution by the disk drive is referred to as the “command queue”.
Traditionally, controllers have been developed to reorder the command queue according to a positional sequence. Examples include reducing the number of changes in the direction of the movement of the head, ordering according to the shortest calculated head movement regardless of direction, and more commonly ordering according to the shortest overall access time between successive commands.
Numerous methods of drive scheduling have been devised to minimize the average access time. The conventional rule used by scheduling algorithms has been to choose the next read/write command from its local queue by essentially executing the earliest executable command. There is, however, some uncertainty with regard to the actual time it would take from the end of the currently active command, that is the command being currently executed, until the onset of execution of the next command. In part, this uncertainty is due to the fact that the seek and settling times are not absolutely deterministic. In some cases, due to the variance of the seek and settling time, the head will not be ready to start executing even though the correct rotational position has been attained. Another problem is that even if there were no uncertainty, once the start and end positions are taken into account, still there would not be sufficient time to calculate the precise access time while the scheduling algorithm is scanning the queue of commands.
In the event the actual access time is underestimated, a complete revolution may be lost. A common solution has been to add a “safety” margin (sometimes called a “fudge” factor) to the seek and settling time and establish a safe estimate of the time at which execution can start for certain. By adding this safety margin, the scheduling algorithm sometimes bypasses or delays a command if this command is not certain to be executed during the first revolution. Such approach could significantly and adversely affect the throughput of the disk drive.
In alternative disk scheduling algorithm is illustrated in U.S. Pat. No. 5,132,855 to Waugh et al., that describes a method for eliminating overshoot of a destination track by a servo head of a rotating disk during seeks, wherein the seek is carried out in accordance with an adaptive velocity demand profile selected, to undershoot the destination track by an amount sufficient to offset overshoot arising from an incapacity of the servo head to follow a velocity demand profile. Prior to performing the seek, the servo head is moved a distance about a null position on the disk, at which the only force on the actuator on which the head is mounted arises from a constant current passed through the actuator and the time for the movement is measured and utilized to select the adaptive demand profile. Adaptive demand profiles are obtained by performing seeks while modifying a nominal profile to eliminate actuator current ringing at the end of the seek. However, the seek time is governed by the physical ability of the seek mechanism to move the read/write head to the desired location, and the electromechanical response of the seek mechanism must be allowed time to settle both electrically and mechanically, with the total settling time based on the seek velocity and swept range.
Another disk scheduling method is illustrated in U.S. Pat. No. 5,570,332 to Heath et al that describes a method to reduce rotational latency in a disk drive by dividing the disk into discrete angular regions. The command queue is then sorted according to commands addressing cylinders or tracks within the angular region having the shortest rotational latency. The sorting algorithm searches the queue for commands addressing physical addresses beginning with those in neighboring angular regions. With each repositioning of the read/write head, the rotational latency of the angular regions from the new head location is reevaluated. However, the time estimates are based on adding safety margins and hence are biased.
Yet another disk scheduling method is exemplified in U.S. Pat. No. 5,664,143 to Olbrich, that describes a method for the rotational position queue to be initially ordered. A first command is chosen and assigned the physical address of its last requested block. Each remaining command in the queue is assigned the physical address of its first requested block. The address differences between each remaining command and the first command are converted into a time difference. The time required for the head to be positioned, the seek time, is subtracted from each time difference. For subtractions resulting in times less than zero an additional amount of time corresponding to a full revolution of latency is added. The commands are then sorted by the smallest time difference, such that the command with the shortest time difference becoming the next command. After the execution of the first command, the command with the shortest time difference is removed from the queue and the next command becomes the first command. The ordering algorithm is then repeated to determine a new next command. Though this scheduling algorithm may have met its objectives, there is nonetheless room for further optimization of expected access seek time by using probabilistic criteria to evaluate commands in the disk scheduling queue.
Still another disk scheduling method is illustrated in U.S. Pat. No. 5,854,941 to Ballard et al., that describes a disk scheduling queue for sorting pending disk I/O commands according to an estimated access time. The estimated access time is calculated from first and second rotational times that are derived from a rotational time table based on logical address and head movement time. Once the command is executed, the rotational positioning algorithm is repeated and the queue is resorted. However, the estimate results in a deterministic value rather than a weighted average that takes into account the probabilities of the possible values.
It is therefore clear that the ability of the head to be placed at the desired track has heretofore been either assumed to be a deterministic factor, or the rotational latency is assumed to provide a sufficient time for certain success of executing the command at the estimated time. Thus, there is still an unsatisfied need for a scheduling algorithm that selects commands based on an unbiased probabilistic approach, for reducing the disk drive latency and improving its throughput. The scheduling algorithm should also be capable of profiling the seek of an I/O command based on its available rotational time, to further improve the average command access time and hence the drive throughput.